package com.bi.onlineEducation.service;

import com.bi.onlineEducation.dao.CoursePathDao;
import com.bi.onlineEducation.domain.CoursePathPo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: chenYuTao
 * @Time: 2022/1/19 23:49
 * @Description:
 **/
@Service
public class CoursePathService {
    @Resource
    private CoursePathDao coursePathDao;

    public List<CoursePathPo> findAll() {
        return coursePathDao.findAll();
    }

    public CoursePathPo findById(Integer id) {
        return coursePathDao.findById(id).get();
    }

    public CoursePathPo save(CoursePathPo coursePathPo) {
        return coursePathDao.save(coursePathPo);
    }

    public Boolean deleteById(Integer id) {
        coursePathDao.deleteById(id);
        return true;
    }

    public CoursePathPo findCoursePathPoBycId(Integer cId) {
        return coursePathDao.findCoursePathPoBycId(cId);
    }
}
